﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using cmsservice.Entity;

namespace cmsservice.DAL
{
    public class ImageManageListDAL
    {
        public List<ImageManageList> GetLst(string fid)
        {
            string sql = "select * from dbo.ImageManageList where fid=@fid";
            Tools tool = new Tools();
            tool.AddSqlParameter("fid", System.Data.SqlDbType.VarChar, fid);
            return SqlHelper.GetDataByColumnsLst<ImageManageList>(DBConn.CMS, sql, tool.GetSqlParameters());
        }

        public List<ImageManageList> GetLstNew(string fid)
        {
            string sql = "select * from dbo.ImageManageList where fid=@fid and type='small'";
            Tools tool = new Tools();
            tool.AddSqlParameter("fid", System.Data.SqlDbType.VarChar, fid);
            return SqlHelper.GetDataByColumnsLst<ImageManageList>(DBConn.CMS, sql, tool.GetSqlParameters());
        }
    }
}
